local Director <const> = require("Director")
local Content <const> = require("Content")
local Path <const> = require("Path")
local DB <const> = require("DB")
local Config <const> = require("Config")

local dbPath = Path(Content.writablePath, "story.db")
DB:exec("ATTACH DATABASE '" .. dbPath .. "' AS story;")
Director.entry:onCleanup(function()
	DB:exec("DETACH DATABASE story")
end)

local conf = Config(
"story",
"charName",
"chapter",

"gold",
"name",


"progress",
"finished",
"understanding",
"relationship",
"mainquest",
"temp",

"ap",
"dailyap",
"days",

"LHS1",
"Vortex1",
"Ryan1",
"Dominik1",
"Fyllis1",
"FyllisPre2",
"Fyllis2_date",
"Fyllis2",
"Jara1",
"LHS2_date",
"LHS2",
"Fyllis",
"Fyllis3",
"Ryan2_date",
"Ryan2",
"Fyllis4",
"Vortex2_date",
"Vortex2",
"progress2",
"Finmq",
"Endmq",
"InfT1",
"Endf")


conf:load()

if not conf.chapter then
	conf.chapter = "start"
end

return conf